<?PHP
class MHDEV_View_Helper_CleanUrlTitle extends Zend_View_Helper_Abstract
{
	/*
	 * Remove all chars without a-z, 0-9 and "-" from a string and replace it with "-"
	 * 
	 * @param string $str
	 * 
	 * @return string cleaned string
	 */
	public function CleanUrlTitle($str)
	{
		$str	= trim($str);
		$str	= str_replace('.', '', $str);
		$str	= str_replace(',', '', $str);
		$str	= str_replace('!', '', $str);
		
		return preg_replace("/[^a-z0-9-]/i", "_", $str);
	}
}
?>